-- GENERATED SPELL FOR [Greater Frayer] --


function spell0_19557(pUnit, Event) --@Lash,n/a--
pUnit:FullCastSpellOnTarget(34644,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19557', 580, 1)
end

function spell1_19557(pUnit, Event) --@Lash,n/a--
pUnit:FullCastSpellOnTarget(39122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19557', 534, 1)
end

function Sorts_19557(pUnit, Event)
local choix_sorts_19557 = math.random(0, 1)
if choix_sorts_19557 == 0 then
pUnit:RegisterEvent('spell0_19557', 1, 1)
end
if choix_sorts_19557 == 1 then
pUnit:RegisterEvent('spell1_19557', 1, 1)
end
end

function mob19557_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19557', math.random(1500, 3000), 1)
end

function mob19557_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19557_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19557_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19557, 1, 'mob19557_Action')
RegisterUnitEvent(19557, 2, 'mob19557_Leave')
RegisterUnitEvent(19557, 3, 'mob19557_Kill')
RegisterUnitEvent(19557, 4, 'mob19557_Die')
